<script setup lang="ts">

import { computed } from 'vue';
import { TreeNode } from './util';


interface Props {
    node:TreeNode
}

const {node} = defineProps<Props>();

const isGroup = computed(() => {
    return node.children != undefined
})



</script>

<template>
    <!-- 组 -->
    <div v-if="isGroup" class="flex items-center">
        <div>

        </div>
        <div>
            <div v-for="child in node.children">
            <item :node="child"></item>
            </div>
        </div>
        
    </div>
    <div v-else>
        <!-- 叶节点 -->
        
    </div>
</template>